<?php
//phpinfo();
 error_reporting(E_ALL);
ini_set('display_errors', '1');
//Gör så att sidan inte sparas i browsern och förvvirrar alla inblandade
header("Cache-Control: no-cache, must-revalidate");	
	
	require_once ("application/controller/ApplicationController.php");
	require_once ("application/model/RecipeCollectionModel.php");
	require_once ("application/model/DALInfoModel.php");

	
	// //If user is returning, welcome user with name
	// if (isset($_SESSION["thisSession"]["Session_Name"]))
	// {
		// $returningName =$_SESSION["thisSession"]["Session_Name"];
	// }
	// else
	// {
		// $returningName = null;
	// }



	$mysqli = new application\model\DALInfoModel();
	
	
	$recipeCollection = new application\model\RecipeCollectionModel($mysqli->getDALInfo());
	
	$recipeController = new application\controller\ApplicationController($recipeCollection);
	
	
	//echo $recipeController->viewRecipes();
	
	echo $recipeController->viewPage();
	